from django.db import models
import datetime
class UserModel(models.Model):
    username = models.CharField(max_length=30,verbose_name="用户名")
    phone = models.CharField(max_length=11,verbose_name="手机号")
    password = models.CharField(max_length=256,verbose_name="密码")
    created_time = models.DateTimeField(verbose_name="注册时间",default=datetime.datetime.now())
    last_login = models.DateTimeField(verbose_name="最后登录时间",default=datetime.datetime.now())

    class Meta:
        db_table = "user_td"
        verbose_name_plural = "用户表"

    def __str__(self):
        return self.username
